package com.lc202407;

public class Solution2956 {
    public int[] findIntersectionValues(int[] nums1, int[] nums2) {
        int m = nums1.length;
        int n = nums2.length;
        int x = 0;
        int y = 0;
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < n; j++) {
                if (nums1[i] == nums2[j]) {
                    x++;
                    break;
                }
            }
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                if (nums2[i] == nums1[j]) {
                    y++;
                    break;
                }
            }
        }
        return new int[]{x, y};
    }

}
